package exception;

import java.awt.*;
import java.io.FileNotFoundException;
import java.io.IOException;

public class ThrowsDemo2 {
    public void dosome()  throws IOException, AWTException{}
}

class SubClass extends ThrowsDemo2{
    //可以完全相同,可以不抛.可以抛部分,可以抛子类


   //public void dosome() throws IOException, AWTException {super.dosome();}
   // public void dosome(){}
   // public void dosome() throws IOException{}
    //public void dosome() throws FileNotFoundException {}

    //public void dosome() throws IllegalAgeException{}  //不允许抛出额外异常(超类没有抛出的)
    //public void dosome() throws Exception{}//不允许抛出超类方法抛出异常的超类型方法
}